Many applications allow a simple script to make changes to the data held in a data storage model. A simple script is a series of instructions or statements, each of which requests the creation, modification, or deletion of data elements in the data storage model. Often, applications that benefit from scripting have consistency constraints. These constraints may define the order, type, and validity of data that may be created, modified, or deleted. Applications can have consistency constraints that number in the hundreds or thousands and are highly complicated. A failure of just one constraint can cause a whole script to fail and lead to data integrity issues.
For more complex systems, where adherence to these constraints could impose significant burdens, the typical approach is to use a procedural script. A procedural script is a small program employing conditional logic to handle the constraints. This type of script generally involves significantly more effort than a simple script. Further this approach requires that the user be aware of the constraints.